import java.util.Scanner;

public class Test {
    //递归求 N 的阶乘
    public static int fun(int n){
        int sum=1;
        if(n==1){
            return 1;
        }
        sum*=n*fun(n-1);
        return sum;
    }
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n= scanner.nextInt();
        int tmp=fun(n);
        System.out.println(tmp);
    }
}
